package com.wl2o2o.leetcode;

import java.util.HashSet;

/**
 * @Author <a href="https://github.com/wl2o2o">程序员CSGUIDER</a>
 * @From <a href="https://wl2o2o.github.io">CSGUIDER博客</a>
 * @CreateTime 2024/4/21
 */

public class Test {
    public static void main(String[] args) {
        HashSet<ListNode> set = new HashSet<>();
        int[] nums = {3, 2, 0, 0, 2, 3};
        ListNode head;
        for (int i = 0; i <nums.length; i++) {
            head = new ListNode(nums[i]);
            set.add(head);
            head = head.next;
        }


        for (ListNode o : set) {
            // 遍历set
            System.out.println(o.val);
        }

    }
}
